package com.lkd.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lkd.entity.Sku;
import com.lkd.mapper.SkuMapper;
import com.lkd.service.SkuService;
import com.lkd.vo.PageBean;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-08-20
 */
@Service
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements SkuService {


    //分页查询
    @Override
    public PageBean<Sku> search(String skuName, Integer pageIndex, Integer pageSize) {
        Page<Sku> page=new Page<>(pageIndex,pageSize);

        page = getBaseMapper().findByPage(page,skuName);
        return new PageBean<>(page);
    }
}
